{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "48ceb14a",
   "metadata": {},
   "source": [
    "# 读取数据和引入模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "398828d7",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:03.095729Z",
     "start_time": "2022-06-22T08:48:01.478881Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "import sklearn as sk\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.tree import DecisionTreeClassifier\n",
    "from sklearn.metrics import roc_curve\n",
    "import toad"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "86342b66",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:03.173201Z",
     "start_time": "2022-06-22T08:48:03.095729Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>installment_BIN</th>\n",
       "      <th>annual_inc_BIN</th>\n",
       "      <th>dti_BIN</th>\n",
       "      <th>revol_bal_BIN</th>\n",
       "      <th>open_il_24m_BIN</th>\n",
       "      <th>mths_since_rcnt_il_BIN</th>\n",
       "      <th>all_util_BIN</th>\n",
       "      <th>avg_cur_bal_BIN</th>\n",
       "      <th>bc_open_to_buy_BIN</th>\n",
       "      <th>mo_sin_old_il_acct_BIN</th>\n",
       "      <th>mo_sin_old_rev_tl_op_BIN</th>\n",
       "      <th>mort_acc_BIN</th>\n",
       "      <th>num_il_tl_BIN</th>\n",
       "      <th>num_rev_tl_bal_gt_0_BIN</th>\n",
       "      <th>percent_bc_gt_75_BIN</th>\n",
       "      <th>term_BIN</th>\n",
       "      <th>emp_length_BIN</th>\n",
       "      <th>home_ownership_BIN</th>\n",
       "      <th>verification_status_BIN</th>\n",
       "      <th>loan_status</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>16023</th>\n",
       "      <td>5.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>83008</th>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>115373</th>\n",
       "      <td>5.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34581</th>\n",
       "      <td>5.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26174</th>\n",
       "      <td>5.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2</td>\n",
       "      <td>6.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18755</th>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>139375</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>105880</th>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>107207</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120453</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>26313 rows × 20 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        installment_BIN  annual_inc_BIN  dti_BIN  revol_bal_BIN  \\\n",
       "16023               5.0             3.0      2.0            2.0   \n",
       "83008               3.0             3.0      2.0            4.0   \n",
       "115373              5.0             3.0      3.0            4.0   \n",
       "34581               5.0             4.0      2.0            3.0   \n",
       "26174               5.0             2.0      3.0            3.0   \n",
       "...                 ...             ...      ...            ...   \n",
       "18755               4.0             4.0      1.0            3.0   \n",
       "139375              4.0             3.0      1.0            2.0   \n",
       "105880              3.0             3.0      3.0            3.0   \n",
       "107207              2.0             2.0      4.0            3.0   \n",
       "120453              1.0             3.0      3.0            4.0   \n",
       "\n",
       "        open_il_24m_BIN  mths_since_rcnt_il_BIN  all_util_BIN  \\\n",
       "16023               4.0                     3.0           2.0   \n",
       "83008               3.0                     2.0           4.0   \n",
       "115373              3.0                     2.0           2.0   \n",
       "34581               3.0                     2.0           4.0   \n",
       "26174               3.0                     2.0           4.0   \n",
       "...                 ...                     ...           ...   \n",
       "18755               3.0                     3.0           4.0   \n",
       "139375              3.0                     2.0           1.0   \n",
       "105880              4.0                     1.0           4.0   \n",
       "107207              4.0                     1.0           4.0   \n",
       "120453              2.0                     3.0           3.0   \n",
       "\n",
       "        avg_cur_bal_BIN  bc_open_to_buy_BIN  mo_sin_old_il_acct_BIN  \\\n",
       "16023               1.0                 4.0                     4.0   \n",
       "83008               2.0                 1.0                     4.0   \n",
       "115373              1.0                 4.0                     4.0   \n",
       "34581               3.0                 2.0                     3.0   \n",
       "26174               1.0                 1.0                     3.0   \n",
       "...                 ...                 ...                     ...   \n",
       "18755               1.0                 1.0                     4.0   \n",
       "139375              2.0                 4.0                     4.0   \n",
       "105880              2.0                 3.0                     4.0   \n",
       "107207              1.0                 2.0                     3.0   \n",
       "120453              1.0                 3.0                     3.0   \n",
       "\n",
       "        mo_sin_old_rev_tl_op_BIN  mort_acc_BIN  num_il_tl_BIN  \\\n",
       "16023                        3.0           1.0            4.0   \n",
       "83008                        3.0           2.0            4.0   \n",
       "115373                       1.0           1.0            4.0   \n",
       "34581                        1.0           2.0            3.0   \n",
       "26174                        3.0           3.0            2.0   \n",
       "...                          ...           ...            ...   \n",
       "18755                        2.0           1.0            4.0   \n",
       "139375                       3.0           3.0            4.0   \n",
       "105880                       3.0           4.0            4.0   \n",
       "107207                       1.0           1.0            3.0   \n",
       "120453                       3.0           1.0            2.0   \n",
       "\n",
       "        num_rev_tl_bal_gt_0_BIN  percent_bc_gt_75_BIN  term_BIN  \\\n",
       "16023                       2.0                   1.0         1   \n",
       "83008                       3.0                   3.0         1   \n",
       "115373                      2.0                   1.0         2   \n",
       "34581                       3.0                   1.0         2   \n",
       "26174                       3.0                   4.0         2   \n",
       "...                         ...                   ...       ...   \n",
       "18755                       3.0                   3.0         1   \n",
       "139375                      4.0                   1.0         1   \n",
       "105880                      2.0                   2.0         1   \n",
       "107207                      3.0                   1.0         1   \n",
       "120453                      2.0                   3.0         1   \n",
       "\n",
       "        emp_length_BIN  home_ownership_BIN  verification_status_BIN  \\\n",
       "16023              3.0                   3                        1   \n",
       "83008              3.0                   2                        2   \n",
       "115373             3.0                   3                        2   \n",
       "34581              3.0                   1                        1   \n",
       "26174              6.0                   1                        3   \n",
       "...                ...                 ...                      ...   \n",
       "18755              3.0                   3                        1   \n",
       "139375             3.0                   1                        1   \n",
       "105880             4.0                   2                        2   \n",
       "107207             2.0                   3                        2   \n",
       "120453             3.0                   2                        2   \n",
       "\n",
       "        loan_status  \n",
       "16023             0  \n",
       "83008             1  \n",
       "115373            1  \n",
       "34581             0  \n",
       "26174             1  \n",
       "...             ...  \n",
       "18755             0  \n",
       "139375            0  \n",
       "105880            0  \n",
       "107207            0  \n",
       "120453            0  \n",
       "\n",
       "[26313 rows x 20 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_train = pd.read_csv('data_train.csv',index_col = 0)\n",
    "data_train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "3becc1dd",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:03.189198Z",
     "start_time": "2022-06-22T08:48:03.175193Z"
    }
   },
   "outputs": [],
   "source": [
    "X_train = data_train.drop(columns = ['loan_status'])\n",
    "y_train = data_train['loan_status']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "6a4f7f8c",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:03.203207Z",
     "start_time": "2022-06-22T08:48:03.195199Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((26313, 19), (26313,))"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train.shape,y_train.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "69652b25",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:03.219203Z",
     "start_time": "2022-06-22T08:48:03.204213Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    19016\n",
       "1     7297\n",
       "Name: loan_status, dtype: int64"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_train.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "56515105",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:03.265215Z",
     "start_time": "2022-06-22T08:48:03.222206Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>installment_BIN</th>\n",
       "      <th>annual_inc_BIN</th>\n",
       "      <th>dti_BIN</th>\n",
       "      <th>revol_bal_BIN</th>\n",
       "      <th>open_il_24m_BIN</th>\n",
       "      <th>mths_since_rcnt_il_BIN</th>\n",
       "      <th>all_util_BIN</th>\n",
       "      <th>avg_cur_bal_BIN</th>\n",
       "      <th>bc_open_to_buy_BIN</th>\n",
       "      <th>mo_sin_old_il_acct_BIN</th>\n",
       "      <th>mo_sin_old_rev_tl_op_BIN</th>\n",
       "      <th>mort_acc_BIN</th>\n",
       "      <th>num_il_tl_BIN</th>\n",
       "      <th>num_rev_tl_bal_gt_0_BIN</th>\n",
       "      <th>percent_bc_gt_75_BIN</th>\n",
       "      <th>term_BIN</th>\n",
       "      <th>emp_length_BIN</th>\n",
       "      <th>home_ownership_BIN</th>\n",
       "      <th>verification_status_BIN</th>\n",
       "      <th>loan_status</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>48588</th>\n",
       "      <td>5.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>6.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>633</th>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100990</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28846</th>\n",
       "      <td>5.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>142311</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1</td>\n",
       "      <td>6.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17896</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>89587</th>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>113265</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70041</th>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35755</th>\n",
       "      <td>5.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>6579 rows × 20 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        installment_BIN  annual_inc_BIN  dti_BIN  revol_bal_BIN  \\\n",
       "48588               5.0             2.0      2.0            3.0   \n",
       "633                 2.0             1.0      1.0            2.0   \n",
       "100990              1.0             3.0      1.0            1.0   \n",
       "28846               5.0             3.0      1.0            3.0   \n",
       "142311              4.0             3.0      4.0            5.0   \n",
       "...                 ...             ...      ...            ...   \n",
       "17896               2.0             3.0      3.0            1.0   \n",
       "89587               4.0             2.0      3.0            3.0   \n",
       "113265              4.0             3.0      4.0            3.0   \n",
       "70041               3.0             2.0      4.0            3.0   \n",
       "35755               5.0             2.0      4.0            4.0   \n",
       "\n",
       "        open_il_24m_BIN  mths_since_rcnt_il_BIN  all_util_BIN  \\\n",
       "48588               2.0                     3.0           1.0   \n",
       "633                 1.0                     4.0           2.0   \n",
       "100990              2.0                     2.0           4.0   \n",
       "28846               1.0                     4.0           1.0   \n",
       "142311              3.0                     2.0           4.0   \n",
       "...                 ...                     ...           ...   \n",
       "17896               4.0                     2.0           4.0   \n",
       "89587               4.0                     2.0           4.0   \n",
       "113265              4.0                     2.0           4.0   \n",
       "70041               2.0                     2.0           2.0   \n",
       "35755               4.0                     2.0           3.0   \n",
       "\n",
       "        avg_cur_bal_BIN  bc_open_to_buy_BIN  mo_sin_old_il_acct_BIN  \\\n",
       "48588               2.0                 4.0                     3.0   \n",
       "633                 1.0                 2.0                     4.0   \n",
       "100990              2.0                 1.0                     4.0   \n",
       "28846               2.0                 4.0                     4.0   \n",
       "142311              2.0                 1.0                     4.0   \n",
       "...                 ...                 ...                     ...   \n",
       "17896               3.0                 2.0                     4.0   \n",
       "89587               1.0                 2.0                     3.0   \n",
       "113265              1.0                 1.0                     4.0   \n",
       "70041               1.0                 3.0                     4.0   \n",
       "35755               2.0                 3.0                     3.0   \n",
       "\n",
       "        mo_sin_old_rev_tl_op_BIN  mort_acc_BIN  num_il_tl_BIN  \\\n",
       "48588                        2.0           3.0            2.0   \n",
       "633                          1.0           1.0            2.0   \n",
       "100990                       3.0           2.0            3.0   \n",
       "28846                        3.0           3.0            1.0   \n",
       "142311                       3.0           2.0            3.0   \n",
       "...                          ...           ...            ...   \n",
       "17896                        3.0           3.0            4.0   \n",
       "89587                        1.0           1.0            4.0   \n",
       "113265                       2.0           1.0            4.0   \n",
       "70041                        2.0           1.0            3.0   \n",
       "35755                        3.0           3.0            3.0   \n",
       "\n",
       "        num_rev_tl_bal_gt_0_BIN  percent_bc_gt_75_BIN  term_BIN  \\\n",
       "48588                       3.0                   1.0         1   \n",
       "633                         2.0                   3.0         1   \n",
       "100990                      1.0                   1.0         1   \n",
       "28846                       2.0                   1.0         1   \n",
       "142311                      3.0                   4.0         1   \n",
       "...                         ...                   ...       ...   \n",
       "17896                       1.0                   1.0         1   \n",
       "89587                       3.0                   3.0         1   \n",
       "113265                      3.0                   3.0         1   \n",
       "70041                       2.0                   3.0         1   \n",
       "35755                       4.0                   4.0         2   \n",
       "\n",
       "        emp_length_BIN  home_ownership_BIN  verification_status_BIN  \\\n",
       "48588              6.0                   1                        1   \n",
       "633                1.0                   2                        2   \n",
       "100990             3.0                   1                        2   \n",
       "28846              3.0                   1                        1   \n",
       "142311             6.0                   1                        3   \n",
       "...                ...                 ...                      ...   \n",
       "17896              2.0                   1                        2   \n",
       "89587              1.0                   3                        1   \n",
       "113265             3.0                   3                        1   \n",
       "70041              3.0                   3                        2   \n",
       "35755              3.0                   1                        3   \n",
       "\n",
       "        loan_status  \n",
       "48588             0  \n",
       "633               1  \n",
       "100990            0  \n",
       "28846             0  \n",
       "142311            0  \n",
       "...             ...  \n",
       "17896             0  \n",
       "89587             0  \n",
       "113265            0  \n",
       "70041             0  \n",
       "35755             0  \n",
       "\n",
       "[6579 rows x 20 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_test = pd.read_csv('data_test.csv',index_col = 0)\n",
    "data_test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "09c308dc",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:03.280217Z",
     "start_time": "2022-06-22T08:48:03.267214Z"
    }
   },
   "outputs": [],
   "source": [
    "X_test = data_test.drop(columns = ['loan_status'])\n",
    "y_test = data_test['loan_status']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "bd3de2ec",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:03.295228Z",
     "start_time": "2022-06-22T08:48:03.281218Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((6579, 19), (6579,))"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_test.shape,y_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "0e8e3eb9",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:03.311238Z",
     "start_time": "2022-06-22T08:48:03.297228Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    4777\n",
       "1    1802\n",
       "Name: loan_status, dtype: int64"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_test.value_counts()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bb078475",
   "metadata": {},
   "source": [
    "# 模型训练"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "639e7d75",
   "metadata": {},
   "source": [
    "## 网格搜索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "fc25f556",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:06.499255Z",
     "start_time": "2022-06-22T08:48:03.313225Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 24 candidates, totalling 72 fits\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "(0.4689165706548984, {'class_weight': {1: 3, 0: 1}, 'max_depth': 6})"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "param={'max_depth':np.arange(2,10,1),'class_weight':[{1: 1, 0: 1}, {1: 2, 0: 1}, {1: 3, 0: 1}]}\n",
    "gridsearch=GridSearchCV(estimator=DecisionTreeClassifier(),\n",
    "                                          param_grid=param,cv=3,scoring='f1',n_jobs=-1,verbose=2)\n",
    "gridsearch.fit(X_train,y_train)\n",
    "gridsearch.best_score_,gridsearch.best_params_"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2524b491",
   "metadata": {},
   "source": [
    "## 训练模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "07aad493",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:06.561675Z",
     "start_time": "2022-06-22T08:48:06.501265Z"
    }
   },
   "outputs": [],
   "source": [
    "DT_model=DecisionTreeClassifier(max_depth=gridsearch.best_params_['max_depth'],class_weight=gridsearch.best_params_['class_weight'])\n",
    "DT_model_fit=DT_model.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0e516908",
   "metadata": {},
   "source": [
    "## 预测与评估"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b3775122",
   "metadata": {},
   "source": [
    "### 混淆矩阵"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "941b2cb5",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:06.592337Z",
     "start_time": "2022-06-22T08:48:06.562669Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>预测为好</th>\n",
       "      <th>预测为坏</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>标签为好</th>\n",
       "      <td>2366</td>\n",
       "      <td>2411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>标签为坏</th>\n",
       "      <td>460</td>\n",
       "      <td>1342</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      预测为好  预测为坏\n",
       "标签为好  2366  2411\n",
       "标签为坏   460  1342"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_pred_test = DT_model_fit.predict(X_test)\n",
    "y_pred_train = DT_model_fit.predict(X_train)\n",
    "cnf_matrix = sk.metrics.confusion_matrix(y_test,y_pred_test)\n",
    "cnf_matrix = pd.DataFrame(cnf_matrix,index = [\"标签为好\",\"标签为坏\"],columns = ['预测为好','预测为坏'])\n",
    "cnf_matrix"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "84db1e13",
   "metadata": {},
   "source": [
    "### 评估指标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "c0e656ea",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:06.623723Z",
     "start_time": "2022-06-22T08:48:06.594344Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>准确率</th>\n",
       "      <th>AUC</th>\n",
       "      <th>KS值</th>\n",
       "      <th>PSI</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.563611</td>\n",
       "      <td>0.66877</td>\n",
       "      <td>0.250171</td>\n",
       "      <td>0.000006</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        准确率      AUC       KS值       PSI\n",
       "0  0.563611  0.66877  0.250171  0.000006"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "accuracy=sk.metrics.accuracy_score(y_test,y_pred_test)\n",
    "y_score=DT_model_fit.predict_proba(X_test)[:,1]\n",
    "auc=sk.metrics.roc_auc_score(y_test,y_score)\n",
    "fpr,tpr,threshold=sk.metrics.roc_curve(y_test,y_score)\n",
    "ks=max([trp_ - fpr_ for trp_, fpr_ in zip(tpr, fpr)])\n",
    "psi=toad.metrics.PSI(y_pred_train,y_pred_test)\n",
    "estimate=pd.DataFrame([[accuracy,auc,ks,psi]],columns=['准确率','AUC','KS值','PSI'])\n",
    "estimate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "bad5a1c2",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:06.856196Z",
     "start_time": "2022-06-22T08:48:06.626706Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAAOXRFWHRTb2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9vBOQAEW7+PfwB6AfsOcfzHn0/1vD3EdDnhpwXcm6Y3YK6GEjWWh/SWlcAXwFjz9hmLPCJNmwA6imlmnkzBq31eq11buXdDRgl7d3Jkd8DwEPAPCDDzcd3NIbbgPla66MAWmt3xuHI8TVQVymlgDoYJ6HVjTGgtV5Tud9z8fT78TQ5N+S8qEkMAXlumJ2g4oFjVe6nVT5W0208HUNVd2F8SnCnC8aglIoHrgem4xmO/B46AfWVUquVUluVUpO8fPx3gK5AOrAbeERrbXdjDI7w9PuxJscJ9HNDzgvHYwjIc8OhiroepKp57Mxx745s4+kYjA2VGo5xEl7qxuM7GsObwONaa5vxIcntHIkhDOgPjACigV+UUhu01ge8dPwrgR3AZUB74Ael1FqtdYEbju8oT78fa3KcQD835LxwPIaAPDfMTlBpQMsq91tgfAKo6TaejgGlVC9gJnCV1jrbjcd3NIYE4KvKk7AhMFopZdVaL/RiDGlAlta6GChWSq0BegPuOBEdOf4U4BVtdHgnK6UOA12ATW44vqM8/X6syXEC/dyQ88LxGALz3HDnRTQnLrqFAYeAtvx28a/7GduM4fcX3jaZEEMrIBkYZNbv4YztZ+H+i8GO/B66Aisrt60F7AF6ePH47wPPVX7fBDgONPTA36MN574Q7NH3Yw1/HwF9bsh5IeeGW4N38gcejfFJIwV4qvKxacC0yu8V8G7l87uBBBNimAnkYjShdwBbvB3DGdu6/UR0NAbgLxgjlvYAj3r579Ac+L7yfbAHmOCB38GXwAnAgvGJ8C5vvx9r8PsI+HNDzovgPjdkqSMhhBA+yexRfEIIIUS1JEEJIYTwSZKghBBC+CRJUEIIIXySJCghhBA+SRKUEEIInyQJSgghhE/6f6lAO7iCG33FAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "y_proba = DT_model_fit.predict_proba(X_test)\n",
    "fig,(axe1,axe2) = plt.subplots(1,2,sharey = True)\n",
    "for i in range(len(np.unique(y_test))):\n",
    "    fpr,tpr,thresholds = roc_curve(y_test,y_proba[:,i],pos_label = i)\n",
    "axe1.plot(fpr,tpr)\n",
    "axe1.plot([0,1],[0,1])\n",
    "axe1.set_title('ROC')\n",
    "axe2.plot(1 - thresholds,tpr,label = 'TPR')\n",
    "axe2.plot(1 - thresholds,fpr,label = 'FPR')\n",
    "plt.xlim(0,)\n",
    "axe2.set_title('KS')\n",
    "plt.tight_layout()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "12739d2c",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
